﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;

namespace ASG.CodeGenerator.SQL
{
    /// <summary>
    /// When inherited, provides functionality for locating database management servsers.
    /// </summary>
    public abstract class DBServersLocator<ServerCollectionType, ServerType, DatabaseType, ConnectionType, TableType, ColumnType, ProcedureType, ProcedureParameterType, ParameterType>
        where ServerCollectionType : DBMServerCodeCollection<ServerType, DatabaseType, ConnectionType, TableType, ColumnType, ProcedureType, ProcedureParameterType, ParameterType>
        where ServerType : DBMServerCode<DatabaseType, ConnectionType, TableType, ColumnType, ProcedureType, ProcedureParameterType, ParameterType>, new()
        where DatabaseType : DatabaseCode<TableType, ColumnType, ProcedureType, ProcedureParameterType, ParameterType>, new()
        where ConnectionType : DbConnection
        where TableType : TableCode<ColumnType, ParameterType>
        where ColumnType : ColumnCode<ParameterType>
        where ProcedureType : ProcedureCode<ProcedureParameterType, ParameterType>
        where ProcedureParameterType : ParameterCode<ParameterType>
        where ParameterType : DbParameter
    {
        /// <summary>
        /// When overridden, gets all the database management servsers located in the local network.
        /// </summary>
        /// <returns>A list of <see cref="T">T</see>.</returns>
        public abstract ServerCollectionType GetServers();
    }
}
